package com.lmy.springboot.controller;

import com.lmy.springboot.bean.Monster;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class HiController {

    @Autowired
    private Monster monster;

    /**
     *  1.如果application.properties 和 application.yaml有相同的前缀值绑定，则application.properties优先级高，开发时应该避免
     *  2.yaml中字符串无需加引号，但使用引号也不会报错
     * @return
     */
    @RequestMapping("/monster")
    public Monster monster() {
        return monster;
    }
}
